import request  from '@/utils/request';

import { BASE_URL } from '@/config/query';

export async function queryTotal() {
  return request(`${BASE_URL}/device/count_statistics`);
}

export async function queryStatisticalIndex() {
  return request(`${BASE_URL}/device/page_statistics`)
}

// 消防主机
export async function queryDeviceFireHost(params) {
  return request(`${BASE_URL}/device_fire_host/page`, params)
}

// 分页查智能烟感
export async function queryDeviceSmartSmoke(params) {
  return request(`${BASE_URL}/device_smart_smoke/page`, params)
}

// 分页查智慧用电
export async function queryDeviceWisdomElectriccity(params) {
  return {}
}

// 分页查智慧用水：分页查询室外消火栓
export async function queryDeviceOutdoorFireHydrant(params) {
  return request(`${BASE_URL}/device_outdoor_fire_hydrant/page`, params)
}

// 分页查询摄像头
export async function queryDeviceCamera(params) {
  return request(`${BASE_URL}/device_camera/page`, params)
}

// 分页用户传输装置
export async function queryTransmission(params) {
  return request(`${BASE_URL}/device_transmission/page`, params)
}

// 分页消防主机子设备
export async function queryDeviceFireHostChild(params) {
  return request(`${BASE_URL}/device_host_sub/page`, params)
}

// 分页查询火焰识别
export async function queryDeviceFlame(params) {
  return request(`${BASE_URL}/device_flame/page`, params)
}

// 智慧用水设备上传日志
export async function queryDeviceOutdoorFireHydrantLog(params) {
  return request(`${BASE_URL}/device_data_push_log/page`, params)
}

// 智慧用水异常统计
export async function queryDeviceOutdoorFireHydrantException() {
  return request(`${BASE_URL}/device_outdoor_fire_hydrant/exception_count`)
}

// 智慧用水详情查
export async function getDeviceOutdoorFireHydrantDetail(id) {
  return request(`${BASE_URL}/device_outdoor_fire_hydrant/detail/${id}`)
}

// 智慧用电异常统计
export async function getDeviceWisdomElectricityException() {
  return {}
}

// 智慧用电详情查
export async function getDeviceWisdomElectricityDetail(id) {
  return request(`${BASE_URL}/device_electricity/detail/${id}`)
}

// 智慧用电设备上传日志
export async function queryDeviceWisdomElectricityLog(params) {
  return request(`${BASE_URL}/device_data_push_log/page`, params)
}

export async function queryDeviceWisdomElectricityLogAll(params) {
  return request(`${BASE_URL}/device_data_push_log/page`, params)
}

// 智慧用电实时数据
export async function queryDeviceWisdomElectricityCurrent(params) {
  return request(`${BASE_URL}/device_data_push_log/list`, params)
}

// 水压波形图
export async function getDeviceOutdoorFireHydrantCurrent(params) {
  return request(`${BASE_URL}/device_data_push_log/list`, params)
}


export async function queryBrandList() {
  return request(`${BASE_URL}/brand/list`)
}

export async function queryProductList(params) {
  return request(`${BASE_URL}/product/list`, params)
}